package com.demo.test.state.mode;

import com.demo.test.state.mode.iml.State;

public class CurrTime10 implements State {

    public void handle(WorkContext workContext){

        if(workContext.getCurrTime() >= 10 ){
           delay(workContext);
        }else{
            System.out.println("神奇时间。。。。");
        }

    }

    private void delay(WorkContext workContext){
        if(workContext.getPersonState() == 4){
            System.out.println("ding。。。迟到打卡。奖励-100元。");
        }else{
           other();
        }
    }

    private void other(){
        System.out.println("旷工旷工旷工！！！");
    }
}

